home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_128 / sdbackup / sdbackup.doc < prev    next >
Text File  |  1992-05-06  |  10KB  |  351 lines

  1.  
  2.     Documentation For version 1.1  
  3.         =============================
  4.  
  5.  
  6.     SDBackup    Version 1.1    
  7.     By Steve Drew     Sep '87
  8.  
  9.  
  10.         Please direct all comments to:    
  11.  
  12.         ENET:    CGFSV1::DREW
  13.         ARPA:    drew%cfgsv1.dec.com@decwrl.dec.com
  14.         USENET:  {decvax!decwrl}!cgfsv1.dec.com!drew    
  15.  
  16.     or any donations to:
  17.  
  18.     52 Castledale Cres. N.E.
  19.     Calgary, Alberta
  20.     Canada
  21.     T3J 1X4
  22.  
  23.  
  24.     Contents:
  25.     =========
  26.  
  27.     I.   Purpose
  28.     II.  Command Format
  29.     III. Prerequisites
  30.     IV.  Error Handling
  31.     V.   Limitations
  32.     VI.  Examples
  33.     VII. Future Enhancements
  34.  
  35.  
  36.  
  37.    I.   Purpose: 
  38.     --------
  39.  
  40.     Intended to backup and restore a selected source volume
  41.     (hard drive) to a multi volume destination (floppies) using
  42.     LZ compression retaining file dates and directory structures.
  43.     The compression is done via Modified Lempel-Ziv method. Which 
  44.     has been sped up using manx 16 bit ints.
  45.  
  46.    II.  Command Format
  47.     --------------
  48.  
  49.     There are three modes that SDBackup can be used in
  50.     Backup, Restore and Maintenance mode.
  51.  
  52.  
  53.     BACKUP:
  54.     
  55.         SDBackup [options] from Label_n:[dir]
  56.         
  57.         from
  58.         is the file or device specification of the device to
  59.             be backed up. This maybe a device (eg. dh0:) a directory
  60.         (eg. dh0:tools) or a file (eg. dh0:tools/shell).
  61.  
  62.         Label_n:
  63.         This is the spec for the first volume to start the backup
  64.         to. Eg. Back_1:. In this case you should of preformatted
  65.             enough floppies with labels Back_1 to Back_n where Back_n
  66.         would probably be about 15 for a 20 meg (full) drive assuming
  67.         about 35% compression. 
  68.                 ** If you did not format enough floppies when you click 
  69.         cancel to the mount request you will then be given the 
  70.         option to have a floppy automatically formatted as the
  71.         next volume and continue.
  72.  
  73.         Options  (applicable to backup)
  74.         -q     
  75.             Quiet mode, files are not printed to stdout as copied.
  76.         
  77.         -l    
  78.             Log a list of files backed up to RAM:Backup.log
  79.             this can later be used to determine which volume
  80.             a particular file is on via:
  81.                 search backup.log filespec
  82.  
  83.         -i
  84.             Don't use compression. Just do an image copy.
  85.  
  86.         -s DD-MMM-YY[:HH:MM] | LAST
  87.  
  88.             Include either a date and optional time or 'LAST'
  89.             keyword. LAST indicates to backup all files that
  90.             have not been backed up before. This makes use
  91.             of the AmigaDos 1.2 Archive bit in the file
  92.             protection mask. 
  93.                 Both these methods are intended to provide effective
  94.             incremental backups.
  95.             eg. A complete backup of dh0: was done a week ago
  96.             so this was you can backup only files changed since
  97.             then via specifying that date or by using the LAST
  98.             key word.     You should do  incrementals to 
  99.             separate disks. (Don't try to overite full Backups
  100.             disks, start a new incremental set). If full backup 
  101.             is Back_n to Back_13 then start this one at Back_14.
  102.             Then when needing to restore dh0: first restore
  103.             Back_n to Back_13 then Back_14 to Back_nn.
  104.             (Actually since you started numerically one higher
  105.             than the ending set of the full backup. It will
  106.             ask for Back_14 automatically. This is because
  107.             when restoring a full top level root (eg. Back_1:
  108.             to dh0:) we don't know when to stop asking for
  109.             next volume. We rely on the user clicking on
  110.             cancel to determine that we are done.)
  111.  
  112.         -n 
  113.             Use the root specified on the from device
  114.             as the starting root rather than concatenating
  115.             it to the source specified root.
  116.  
  117.             eg. SDBackup -n dh0:Tools Back_1:OldTools
  118.                 will backup the files and directories under
  119.                 dh0:tools into Back_1:OldTools 
  120.                  *  This will also create sub directories 
  121.                 under dh0:Tools into sub directories 
  122.                 under Back_1:OldTools
  123.  
  124.             ( Without the -n switch this would move the files
  125.             from dh0:Tools to Back_1:OldTools/Tools...      )
  126.  
  127.         -f   
  128.             Files only switch. Same as -n switch except all
  129.             files from every level are placed only in the
  130.             destination directory. (Does not create sub dirs).
  131.  
  132.             Note: -f and -n cannot both be selected.
  133.  
  134.         Notes on Backing up:
  135.  
  136.         o All files that are compressed during backup have a ".Z"
  137.           tacked on to the end of the file spec. This is then removed
  138.           during the restore procedure.
  139.         o Any .arc , .ARC or .Z extension files are not compressed 
  140.           during backup. This is because compressing a compressed 
  141.           file results in a bigger output file.
  142.         o When quiet mode is not selected the following messages
  143.           will be seen:
  144.  
  145.            dev:dir../file.ext ==> Label_n:dir../file.ext.Z [Compressed n.n%]
  146.                  or if no compression used:
  147.        dev:dir../file.ext ==> Label_n:dir../file.ext   [Copied]
  148.  
  149.  
  150.  
  151.     RESTORE:
  152.     
  153.         SDBackup -r [options] Label_n:[dir][file] ToDIR
  154.         
  155.         Label_n:
  156.         This is the spec for the first volume to start the restore
  157.         from. Eg. Back_1:
  158.         If you are restoring a file or directory and you have 
  159.         determined which label it starts on, then enter that 
  160.         label name to start with. Or enter the first volume and
  161.         be prompted for the following volumes until that directory
  162.         or file is found.
  163.  
  164.         ToDir
  165.         Where to put the files. Must ALWAYS be a directory.
  166.         Usually this would be the from spec you had entered when 
  167.         you did the Backup. (eg. Dh0:) But it could be a different
  168.         root or to be put under another directory (See -n switch).
  169.  
  170.         Options (applicable to restoring)
  171.     
  172.             -r
  173.             This denotes that we are doing a restore rather than a 
  174.             backup. In this case it is the source that is a multi-
  175.             volume set. And we do decompression of any .Z files.
  176.  
  177.             -q
  178.             Don't print files as there are restored, to stdout.
  179.  
  180.             -s 
  181.             Not really needed for restore operations although
  182.             it will work. The -s LAST keyword will not work with
  183.             restoring. See above.
  184.  
  185.             -i  
  186.             Don't decompress, just an image copy.
  187.  
  188.             -n  
  189.             Same function as -n on backup. See above.
  190.  
  191.             -f 
  192.             Same function as -f on backup. See above.
  193.  
  194.         
  195.        Notes on restoring:
  196.  
  197.           o If compression was used on backup, files will have 
  198.         a .Z appended  and you will have to include this into
  199.         the file spec if selecting just a single file to restore.
  200.  
  201.           o When restoring from a top level directory eg. Back_1:
  202.         we are unable to determine when we have finished the
  203.         restore and will keep asking for the next volume. You
  204.         must then click cancel,  after the last volume has
  205.         be restored. (This is because every volume has a top
  206.         level directory)
  207.         When restoring a selected file or directory we can
  208.         determine when to stop asking for the next volume.
  209.  
  210.  
  211.     MAINTENANCE MODE:
  212.  
  213.         SDBackup [-s last] -V [-M | -C]  path
  214.     
  215.         Maintenance mode allows for viewing of files that would be
  216.         backed up according to your file spec and -s qualifiers or
  217.         to mark or clear the archive bit on any selected files.
  218.         
  219.            - s last
  220.             select only files with archive bit set.
  221.  
  222.            -V  
  223.             View mode, enables file listing of files that will
  224.             be chosen for backup. If included with -D or -C
  225.             will display files as their Archive bit is set
  226.             or cleared.
  227.  
  228.            -M
  229.             Mark file as Backed up. (Set archive bit).
  230.  
  231.            -C
  232.             Clear archive bit.
  233.  
  234.         note: all other switches are ignored when in maint mode.
  235.  
  236.         Examples of maintenance mode commands:
  237.         
  238.         SDBackup -C dh0:      ! clear archive bit on all files
  239.  
  240.         SDBackup -M dh0:TMPdir   ! set archive bit on all files/dir
  241.                        under tmpdir.
  242.  
  243.         SDBackup -s last -V dh0: ! show all files that have not
  244.                        been backed up. (archive clear).
  245.  
  246.         SDbackup -V -M dh0:     ! mark archive bit, show files as
  247.                        we do it.
  248.             
  249.  
  250.    III. Prerequisites
  251.     ------------
  252.  
  253.     o Any file system device.
  254.       It is not device dependent so you may backup/restore to from
  255.       any file system device.
  256.     o Format program.
  257.       Since the format program is optionally called, it must be found
  258.       via the AmigaDos Pathing from the current CLI.
  259.       The format command is usually found in SYS:System/. So do a
  260.       path SYS:system add if necessary.
  261.  
  262.    IV.  Error Handling
  263.     --------------
  264.  
  265.     Possible Errors:            What is done:
  266.         ---------------                -------------
  267.     Read error on source.               skip file, continue on.
  268.        *Write error to destination.        skip file, continue on.
  269.     Can't find next volume on Backup    Allow formatting a new disk, cont.
  270.     Error creating directory        Skip entire directory, continue.
  271.  
  272.     *write err's (if detected may cause unable to handle conditions, 
  273.      if dos decides the disk is corrupt ). Also if you were
  274.      doing an incremental backup, those files that did make it
  275.      on the disk before it went bad, will be marked as backed up.
  276.  
  277.     Recovering from a serious error/crash. If you were backing up
  278.     and the system crashed or there was some reason that the backup
  279.     aborted. You can restart at the very file you left off at by
  280.     always using the -s LAST switch, this would then skip all the
  281.     files you had already done since the archive bit would be set.
  282.     If you are doing a full backup (all files) it would be a good
  283.     idea to first use the maintenace mode and clear the archive
  284.     bit on all the files. That way if you should have to restart
  285.     the files, will be correctly marked.
  286.  
  287.  
  288.    V.    Limitations
  289.     -----------
  290.  
  291.     As per this version SDBackup can only be run from the CLI.
  292.  
  293.  
  294.    VI.  Examples
  295.     --------
  296.  
  297.     1. Full Backup of dh0: to Floppies starting with label Backup_1: ,
  298.        making a log file (ram:Backup.log) of all copied files.
  299.  
  300.         SDBackup -l dh0: Backup_1:
  301.  
  302.        Restoring above:
  303.     
  304.         SDBackup -r Backup_1: dh0:
  305.  
  306.     2. Incremental Backup of dh0: since 25-Aug-87:17:00
  307.  
  308.             SDBackup -s 25-aug-87:17:00 dh0: Backup_incr_1:
  309.  
  310.        Restoring dh0: (assuming dh0: now empty):
  311.         
  312.         SDBackup -r Backup_1: dh0:
  313.        then SDBackup -r Backup_incr_1: dh0:
  314.  
  315.     3. Backup only file dh0:source/FooBar.c to directory Back_9:OLD with
  316.        no compression
  317.  
  318.         SDBackup -fi dh0:source/FooBar.c Back_9:OLD
  319.  
  320.        Restoring above file to dh0:source
  321.  
  322.         SDBackup -f -r Back_9:OLD/FooBar.c dh0:source
  323.  
  324.     4. Backup root dh0:Sonix starting at Back_1:Music/Sonix_V1
  325.  
  326.         SDBackup -n dh0:Sonix Back_1:Music/Sonix_V1
  327.  
  328.        Restoring above to dh0:Music/Sonix_V1
  329.  
  330.         SDBackup -r Back_1:Music/Sonix_V1 dh0:
  331.             
  332.     5. Backup file dh0:Tools/ls to Back_11:Tools directory
  333.            
  334.         SDBackup -f dh0:tools/ls Back_11:Tools
  335.  
  336.        Restoring above 
  337.         
  338.         SDBackup -rf Back_11:Tools/ls.Z dh0:
  339.  
  340.  
  341.  
  342.     
  343.    VII. Future Enhancements
  344.         -------------------
  345.  
  346.     o Add -o switch to force overiding an existing file when restoring
  347.       else only restore if Backup file is newer than destination.
  348.  
  349.     o As per suggestions.
  350.     
  351.